Optimal. Leaf size=246 \[ \frac {\sqrt {d+e x} \sqrt {f+g x} \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^2 g^3}-\frac {(e f-d g) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^{5/2} g^{7/2}}-\frac {(d+e x)^{3/2} \sqrt {f+g x} (-6 b e g+7 c d g+5 c e f)}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {951, 80, 50, 63, 217, 206} \[ \frac {\sqrt {d+e x} \sqrt {f+g x} \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^2 g^3}-\frac {(e f-d g) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{8 e^{5/2} g^{7/2}}-\frac {(d+e x)^{3/2} \sqrt {f+g x} (-6 b e g+7 c d g+5 c e f)}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 80
Rule 206
Rule 217
Rule 951
Rubi steps
\begin {align*} \int \frac {\sqrt {d+e x} \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx &=\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}+\frac {\int \frac {\sqrt {d+e x} \left (\frac {1}{2} \left (6 a e^2 g-c d (5 e f+d g)\right )-\frac {1}{2} e (5 c e f+7 c d g-6 b e g) x\right )}{\sqrt {f+g x}} \, dx}{3 e^2 g}\\ &=-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}+\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \int \frac {\sqrt {d+e x}}{\sqrt {f+g x}} \, dx}{8 e^2 g^2}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \int \frac {1}{\sqrt {d+e x} \sqrt {f+g x}} \, dx}{16 e^2 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {f-\frac {d g}{e}+\frac {g x^2}{e}}} \, dx,x,\sqrt {d+e x}\right )}{8 e^3 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {\left ((e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1-\frac {g x^2}{e}} \, dx,x,\frac {\sqrt {d+e x}}{\sqrt {f+g x}}\right )}{8 e^3 g^3}\\ &=\frac {\left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \sqrt {d+e x} \sqrt {f+g x}}{8 e^2 g^3}-\frac {(5 c e f+7 c d g-6 b e g) (d+e x)^{3/2} \sqrt {f+g x}}{12 e^2 g^2}+\frac {c (d+e x)^{5/2} \sqrt {f+g x}}{3 e^2 g}-\frac {(e f-d g) \left (c \left (5 e^2 f^2+2 d e f g+d^2 g^2\right )+2 e g (4 a e g-b (3 e f+d g))\right ) \tanh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e} \sqrt {f+g x}}\right )}{8 e^{5/2} g^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.01, size = 225, normalized size = 0.91 \[ \frac {-e \sqrt {g} \sqrt {d+e x} (f+g x) \left (c \left (3 d^2 g^2-2 d e g (g x-2 f)+e^2 \left (-15 f^2+10 f g x-8 g^2 x^2\right )\right )-6 e g (4 a e g+b (d g-3 e f+2 e g x))\right )-3 (e f-d g)^{3/2} \sqrt {\frac {e (f+g x)}{e f-d g}} \sinh ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e f-d g}}\right ) \left (2 e g (4 a e g-b (d g+3 e f))+c \left (d^2 g^2+2 d e f g+5 e^2 f^2\right )\right )}{24 e^3 g^{7/2} \sqrt {f+g x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.15, size = 576, normalized size = 2.34 \[ \left [-\frac {3 \, {\left (5 \, c e^{3} f^{3} - 3 \, {\left (c d e^{2} + 2 \, b e^{3}\right )} f^{2} g - {\left (c d^{2} e - 4 \, b d e^{2} - 8 \, a e^{3}\right )} f g^{2} - {\left (c d^{3} - 2 \, b d^{2} e + 8 \, a d e^{2}\right )} g^{3}\right )} \sqrt {e g} \log \left (8 \, e^{2} g^{2} x^{2} + e^{2} f^{2} + 6 \, d e f g + d^{2} g^{2} + 4 \, {\left (2 \, e g x + e f + d g\right )} \sqrt {e g} \sqrt {e x + d} \sqrt {g x + f} + 8 \, {\left (e^{2} f g + d e g^{2}\right )} x\right ) - 4 \, {\left (8 \, c e^{3} g^{3} x^{2} + 15 \, c e^{3} f^{2} g - 2 \, {\left (2 \, c d e^{2} + 9 \, b e^{3}\right )} f g^{2} - 3 \, {\left (c d^{2} e - 2 \, b d e^{2} - 8 \, a e^{3}\right )} g^{3} - 2 \, {\left (5 \, c e^{3} f g^{2} - {\left (c d e^{2} + 6 \, b e^{3}\right )} g^{3}\right )} x\right )} \sqrt {e x + d} \sqrt {g x + f}}{96 \, e^{3} g^{4}}, \frac {3 \, {\left (5 \, c e^{3} f^{3} - 3 \, {\left (c d e^{2} + 2 \, b e^{3}\right )} f^{2} g - {\left (c d^{2} e - 4 \, b d e^{2} - 8 \, a e^{3}\right )} f g^{2} - {\left (c d^{3} - 2 \, b d^{2} e + 8 \, a d e^{2}\right )} g^{3}\right )} \sqrt {-e g} \arctan \left (\frac {{\left (2 \, e g x + e f + d g\right )} \sqrt {-e g} \sqrt {e x + d} \sqrt {g x + f}}{2 \, {\left (e^{2} g^{2} x^{2} + d e f g + {\left (e^{2} f g + d e g^{2}\right )} x\right )}}\right ) + 2 \, {\left (8 \, c e^{3} g^{3} x^{2} + 15 \, c e^{3} f^{2} g - 2 \, {\left (2 \, c d e^{2} + 9 \, b e^{3}\right )} f g^{2} - 3 \, {\left (c d^{2} e - 2 \, b d e^{2} - 8 \, a e^{3}\right )} g^{3} - 2 \, {\left (5 \, c e^{3} f g^{2} - {\left (c d e^{2} + 6 \, b e^{3}\right )} g^{3}\right )} x\right )} \sqrt {e x + d} \sqrt {g x + f}}{48 \, e^{3} g^{4}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 291, normalized size = 1.18 \[ \frac {1}{24} \, \sqrt {{\left (x e + d\right )} g e - d g e + f e^{2}} {\left (2 \, {\left (x e + d\right )} {\left (\frac {4 \, {\left (x e + d\right )} c e^{\left (-3\right )}}{g} - \frac {{\left (7 \, c d g^{4} e^{6} + 5 \, c f g^{3} e^{7} - 6 \, b g^{4} e^{7}\right )} e^{\left (-9\right )}}{g^{5}}\right )} + \frac {3 \, {\left (c d^{2} g^{4} e^{6} + 2 \, c d f g^{3} e^{7} - 2 \, b d g^{4} e^{7} + 5 \, c f^{2} g^{2} e^{8} - 6 \, b f g^{3} e^{8} + 8 \, a g^{4} e^{8}\right )} e^{\left (-9\right )}}{g^{5}}\right )} \sqrt {x e + d} - \frac {{\left (c d^{3} g^{3} + c d^{2} f g^{2} e - 2 \, b d^{2} g^{3} e + 3 \, c d f^{2} g e^{2} - 4 \, b d f g^{2} e^{2} + 8 \, a d g^{3} e^{2} - 5 \, c f^{3} e^{3} + 6 \, b f^{2} g e^{3} - 8 \, a f g^{2} e^{3}\right )} e^{\left (-\frac {5}{2}\right )} \log \left ({\left | -\sqrt {x e + d} \sqrt {g} e^{\frac {1}{2}} + \sqrt {{\left (x e + d\right )} g e - d g e + f e^{2}} \right |}\right )}{8 \, g^{\frac {7}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 763, normalized size = 3.10 \[ \frac {\sqrt {e x +d}\, \sqrt {g x +f}\, \left (24 a d \,e^{2} g^{3} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )-24 a \,e^{3} f \,g^{2} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )-6 b \,d^{2} e \,g^{3} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )-12 b d \,e^{2} f \,g^{2} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )+18 b \,e^{3} f^{2} g \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )+3 c \,d^{3} g^{3} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )+3 c \,d^{2} e f \,g^{2} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )+9 c d \,e^{2} f^{2} g \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )-15 c \,e^{3} f^{3} \ln \left (\frac {2 e g x +d g +e f +2 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}}{2 \sqrt {e g}}\right )+16 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}\, c \,e^{2} g^{2} x^{2}+24 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b \,e^{2} g^{2} x +4 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c d e \,g^{2} x -20 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,e^{2} f g x +48 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, a \,e^{2} g^{2}+12 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b d e \,g^{2}-36 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, b \,e^{2} f g -6 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,d^{2} g^{2}-8 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c d e f g +30 \sqrt {e g}\, \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, c \,e^{2} f^{2}\right )}{48 \sqrt {\left (e x +d \right ) \left (g x +f \right )}\, \sqrt {e g}\, e^{2} g^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 74.34, size = 1832, normalized size = 7.45 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________